package com.ht.api.gaoxian;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ht.api.open.OpenUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Arrays;

@Slf4j
@SpringBootTest
public class SendMoment {



    @Test
    public void moment () {
        long API_ID = 1892041255978930176L;
        String appid = "1876990838014349312";

        JSONObject param = JSONUtil.createObj();
        param.set("text.content", "xxxxx");
        param.set("visible_range.sender_list.user_list", Arrays.asList("GaoXian"));
        param.set("visible_range.external_contact_list.tag_list", Arrays.asList());

        String str = OpenUtil.callByDebug(appid, API_ID, param);


        log.info(JSONUtil.parseObj(str).toStringPretty());
    }

}
